package com.example.thecv;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity {

	
	private MainActivity self = this;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		class ButtonClickListener implements Button.OnClickListener {
			private String currentCV;
			
			public ButtonClickListener(String currentCV) {
				this.currentCV = currentCV;
			}
			
			@Override
			public void onClick(View v) {
				Intent i = new Intent(self, Info.class);
		    	i.putExtra("currentCV", currentCV);
		    	startActivity(new Intent(i));
			}
			
		}
		
		((Button) findViewById(R.id.jason_button)).setOnClickListener(new ButtonClickListener("jason"));
		((Button) findViewById(R.id.johan_button)).setOnClickListener(new ButtonClickListener("johan"));
		((Button) findViewById(R.id.jimmy_button)).setOnClickListener(new ButtonClickListener("jimmy"));
		((Button) findViewById(R.id.ali_button)).setOnClickListener(new ButtonClickListener("ali"));
		((Button) findViewById(R.id.hammad_button)).setOnClickListener(new ButtonClickListener("hammad"));
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
